#include <reg52.h>   
#include <intrins.h>
 



void showClockTime(unsigned char timeHour,unsigned char timeMin,unsigned char timeSecond)
{	
	unsigned char Dig1,Dig2,Dig4,Dig5,Dig7,Dig8;
	unsigned char max7219Map[10] = {0x7e,0x30,0x6d,0x79,0x33,0x5b,0x5f,0x70,0x7f,0x7b};
	
	Dig1 = timeSecond % 10;
	Dig2 = timeSecond / 10;
	WriteMax7219(Addr_Digit1, max7219Map[Dig1]);
	WriteMax7219(Addr_Digit2, max7219Map[Dig2]);
	WriteMax7219(Addr_Digit3, 0x01); //-
	
	Dig4 = timeMin % 10;
	Dig5 = timeMin / 10;
	WriteMax7219(Addr_Digit4, max7219Map[Dig4]);
	WriteMax7219(Addr_Digit5, max7219Map[Dig5]);
	WriteMax7219(Addr_Digit6, 0x01); //-
	
	Dig7 = timeHour % 10;
	Dig8 = timeHour / 10;
	WriteMax7219(Addr_Digit7, max7219Map[Dig7]);
	WriteMax7219(Addr_Digit8, max7219Map[Dig8]);
}

